-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat/CXSPA-7935:Modify the OCC API endpoint for SPA consumes(#19141) #19141
Conversation
@@ -11,7 +11,7 @@ export const defaultOccUserProfileConfig: OccConfig = { | |||
occ: { | |||
endpoints: { | |||
userRegister: 'users', | |||
userForgotPassword: 'forgottenpasswordtokens', | |||
userForgotPassword: 'passwordRestoreToken', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
create new one instead of change existing one.
...CONTENT_TYPE_URLENCODED_HEADER, | ||
}); | ||
const body = { loginId: userEmailAddress }; | ||
let headers = new HttpHeaders(CONTENT_TYPE_JSON_HEADER); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let headers = new HttpHeaders(CONTENT_TYPE_JSON_HEADER); | |
const headers = new HttpHeaders(CONTENT_TYPE_JSON_HEADER); |
Test summaryRun details
Flakiness
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Cloud |
|
||
expect(mockReq.request.body).toEqual({ | ||
newLoginId: newUserId, | ||
password: currentPassword, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
password: currentPassword, | |
password: currentPassword |
@@ -351,8 +341,11 @@ describe('OccUserProfileAdapter', () => { | |||
); | |||
|
|||
expect(mockReq.cancelled).toBeFalsy(); | |||
expect(mockReq.request.body).toEqual({ | |||
oldPassword: oldPassword, | |||
newPassword: newPassword, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newPassword: newPassword, | |
newPassword: newPassword |
return this.http.put(url, httpParams, { headers }).pipe( | ||
const body = { | ||
oldPassword: oldPassword, | ||
newPassword: newPassword, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newPassword: newPassword, | |
newPassword: newPassword |
return this.http.put(url, httpParams, { headers }).pipe( | ||
const body = { | ||
newLoginId: newUserId, | ||
password: currentPassword, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
password: currentPassword, | |
password: currentPassword |
The below old OCC API endpoints are deprecated:
https://api.cg79x9wuu9-eccommerc1-p1-public.model-t.myhybris.cloud/occ/v2/swagger-ui/index.html#/Users/replaceUserLogin
https://api.cg79x9wuu9-eccommerc1-p1-public.model-t.myhybris.cloud/occ/v2/swagger-ui/index.html#/Users/replaceUserPassword
https://api.cg79x9wuu9-eccommerc1-p1-public.model-t.myhybris.cloud/occ/v2/swagger-ui/index.html#/Forgotten%20Passwords/doRestorePassword
SPA should be consume the below new OCC API endpoints instead of the deprecated ones:
https://api.cg79x9wuu9-eccommerc1-p1-public.model-t.myhybris.cloud/occ/v2/swagger-ui/index.html#/Users/changeUserLoginId
https://api.cg79x9wuu9-eccommerc1-p1-public.model-t.myhybris.cloud/occ/v2/swagger-ui/index.html#/Users/changeUserPassword
https://api.cg79x9wuu9-eccommerc1-p1-public.model-t.myhybris.cloud/occ/v2/swagger-ui/index.html#/Forgotten%20Passwords/sendPasswordRestoreToken
Regression test needs to be done.